package com.sch.hospital.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sch.hospital.Mapper.DepartmentMapper;
import com.sch.hospital.domain.Department;
import com.sch.hospital.service.IDepartmentService;

/**
 * 医院部门Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-30
 */
@Service
public class DepartmentServiceImpl implements IDepartmentService 
{
    @Autowired
    private DepartmentMapper departmentDao;

    /**
     * 查询医院部门
     * 
     * @param id 医院部门主键
     * @return 医院部门
     */
    @Override
    public Department selectDepartmentById(Long id)
    {
        return departmentDao.selectDepartmentById(id);
    }

    /**
     * 查询医院部门列表
     * 
     * @param department 医院部门
     * @return 医院部门
     */
    @Override
    public List<Department> selectDepartmentList(Department department)
    {
        return departmentDao.selectDepartmentList(department);
    }

    /**
     * 新增医院部门
     * 
     * @param department 医院部门
     * @return 结果
     */
    @Override
    public int insertDepartment(Department department)
    {
        return departmentDao.insertDepartment(department);
    }

    /**
     * 修改医院部门
     * 
     * @param department 医院部门
     * @return 结果
     */
    @Override
    public int updateDepartment(Department department)
    {
        return departmentDao.updateDepartment(department);
    }

    /**
     * 批量删除医院部门
     * 
     * @param ids 需要删除的医院部门主键
     * @return 结果
     */
    @Override
    public int deleteDepartmentByIds(Long[] ids)
    {
        return departmentDao.deleteDepartmentByIds(ids);
    }

    /**
     * 删除医院部门信息
     * 
     * @param id 医院部门主键
     * @return 结果
     */
    @Override
    public int deleteDepartmentById(Long id)
    {
        return departmentDao.deleteDepartmentById(id);
    }
}
